﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CLEX.AdminUI.Service;

namespace CLEX.AdminUI.ViewModel
{
    internal sealed class DatabaseReadVM : ViewModelBase
    {
        private readonly DatabaseData database;
        private readonly string ownerUsername;

        public string OwnerUsername
        {
            get { return ownerUsername; }
        } 

        public int DatabaseId
        {
            get { return database.DatabaseId; }
        }

        public int OwnerUserId
        {
            get { return database.OwnerUserId; }
        }

        public string Name
        {
            get { return database.Name; }
        }

        public string ConnectionString
        {
            get { return database.ConnectionString; }
        }

        public DatabaseReadVM(DatabaseData database, string ownerUsername)
        {
            this.database = database;
            this.ownerUsername = ownerUsername;
        }

        public DatabaseData GetData()
        {
            return database;
        }
    }
}
